<?php

class Data {
	const DATA_DIR = 'app/data';

	static function write($vars) {
		$id = $vars[1];
		$data = $vars[2];;

		nFileData::write(self::DATA_DIR, $id, $data);
		echo 'ok';
	}

	static function read($vars) {
		$id = $vars[1];

		echo htmlentities(nFileData::read(self::DATA_DIR, $id));
	}
}